<?php

?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Rx08 &rsaquo; Rapidleech - Installation</title>
<link rel="stylesheet" href="<?php echo ROOT_URL ."/".CONFIG_DIR;?>css/setup.css" type="text/css" />
<style type="text/css">


</style>
</head>
<body class="install-body">
<div class="container">
<div class="head_container">
<h1 id="logo"><img alt="Rapidleech" src="<?php echo IMAGE_DIR;?>rl_lgo.png" /></h1>
</div>
<?php
if(isset($_POST["step"]) && $_POST["step"]=="1"){

   echo ":: POST; Niatna mo ada form utk user customize default primary config. lagi dibuat... :p";
   echo '<br /><br />';
   echo '<p>Saving config file ...</p>';
   $target_conf_file = $working_dir .'/'. CONFIG_DIR.'config.php';
   $ret_copy = copy(DEFAULT_CONFIG_FILE, $target_conf_file);
   if($ret_copy) @chmod ( $target_conf_file, 0666 );
   sleep(1);
   
   if($ret_copy){
    echo '<p>Config file saved.';
    echo '<center><input type="submit" onclick="location.href=\''.$options['index_file'].'\';" value="Let&#8217;s rock n&#8217; roll!" class="button"/></center></p>';
   }else{
    echo '<p>Error while saving config file.</p>';
   }
 
}
else{
?><p>Welcome Leechers. It seems <code>config.php</code> file doesn't exist or it is the first time for this page to be launched.<br />
Before getting started, you should review some information on your server.</p>
<div class="view_checker">
<div class="m">
<fieldset>
<?php include_once("setup_chk.inc.php"); ?>
</fieldset>
</div>
</div>
<p>If for any reason this Installation doesn't work, You can delete <code>config.php</code> to see this page again. You may also simply open <code>config.default.php</code> in a text editor, set it up with your need, and save it as <code>config.php</code>.</p>
<div style="text-align:center">
<form action="<?php echo ROOT_URL."/".$options["index_file"];?>" method="post">
 <input type="hidden" name="step" value="1" />
 <input type="submit" value="Let&#8217;s go!" class="button"/>
</form>
</div>

<?php
}
?>
</div>
</body></html>